<?php
/**
 * Created by PhpStorm.
 * User: 40323
 * Date: 2017-09-12
 * Time: 12:04
 */

namespace app\api\controller\v1;

use app\api\model\User as UserModel;

class User
{

    //获取用户信息
    public function read($id=0)
    {
        echo 1;exit;
        $user = UserModel::get($id,'profile');
        if($user){
            return json($user);
        }else{
            return json(['error'=>'用户不存在'],404);
        }
    }
}